<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改信息</title>
<script type="text/javascript" src="../../js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="../../js/form/jquery.form.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	var str = location.href;
	var num = str.indexOf("?");
	var recruitmentId = str.substr(num+15,str.length);
	var recruitmentObj=null;
	$.ajax({
		type : 'post',
		dataType : 'text',
		async: false,
		url : '../../company/getRecruitmentInfoById.action',
		data : {
			"recruitmentEasyDTO.recruitmentId":recruitmentId
		},
		success : function(msg) {
			recruitmentObj = JSON.parse(msg);
			$("#recruitmentEasyDTO\\.recruitmentPosition").val(recruitmentObj[0].recruitmentPosition);
			$("#recruitmentInfo").html(recruitmentObj[0].recruitmentInfo);
			$("#recruitmentEasyDTO\\.recruitmentRemarks").val(recruitmentObj[0].recruitmentRemarks);
			$("#recruitmentEasyDTO\\.recruitmentNum").val(recruitmentObj[0].recruitmentNum);
			$("#recruitmentEasyDTO\\.recruitmentId").val(recruitmentObj[0].recruitmentId);
		}
	});
});
$.updateRecrit = function(){
	var info = $("#recruitmentInfo").html();
	$("#recruitmentEasyDTO\\.recruitmentInfo").val(info);
	var options = {
			type : 'post',
			dataType : 'text',
			url : '../../company/updateSomeRecritInfo.action',
			success : function(msg) {
				if(msg == 1)
					alert("修改成功!");
				else
					alert("修改失败!");
			}
	}
	$("#upReform").ajaxSubmit(options);
}
</script>
</head>
<style>
*{font-family:"微软雅黑"}
#headDiv{
margin-left:35%;
}
.remarks{
 	max-width: 300px; 
    max-height: 300px;
    margin-left: auto; 
    margin-right: auto; 
    padding: 3px; 
    border: 1px solid #a0b3d6; 
    font-size: 12px; 
    overflow-x: hidden;
}
.im{
width:30px;
height:30px;
margin-left:30px;
}
</style>
<body>
<div id="main-content">
<form name="upReform" id="upReform" method="post">
<p>职位名称:&nbsp;<input id="recruitmentEasyDTO.recruitmentPosition" style="font-weight:bold" name="recruitmentEasyDTO.recruitmentPosition"></input></p>
<p>招聘人数:&nbsp;<input id="recruitmentEasyDTO.recruitmentNum" style="font-weight:bold" name="recruitmentEasyDTO.recruitmentNum"></input></p>
<p>职位信息:</p>
<div class="remarks" id="recruitmentInfo" contenteditable="true"></div>
<p>备注信息:&nbsp;<input id="recruitmentEasyDTO.recruitmentRemarks" name="recruitmentEasyDTO.recruitmentRemarks"></input></p>
<input type="hidden" id="recruitmentEasyDTO.recruitmentId" name="recruitmentEasyDTO.recruitmentId">
<input type="hidden" name="recruitmentEasyDTO.recruitmentInfo" id="recruitmentEasyDTO.recruitmentInfo">
<input type="button" value="保存修改" onclick="$.updateRecrit()">
</form>
</div>
</body>
</html>